package io.gitee.yth.design.pattern.test.core.pattern.behavioral.command.light;

/**
 * @author yth
 * @since 2023-04-28-23:22
 */
public class LightReceiver {

    private boolean isOn = false;

    public void on() {
        System.out.println("light on ...");
        isOn = true;
    }

    public void off() {
        System.out.println("light off ...");
        isOn = false;
    }

    public boolean isOn() {
        return isOn;
    }

    public void setOn(boolean on) {
        isOn = on;
    }
}
